// (Compute the volume of a cylinder) Write a program that reads in the radius 
// and length of a cylinder and computes the area and volume using the following 
// formulas:
// area = radius * radius * p
// volume = area * length

import java.util.Scanner;

public class test22 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        
        // 提示用户输入半径和长度
        System.out.print("Enter the radius and length of a cylinder: ");
        double radius = input.nextDouble();
        double length = input.nextDouble();    
        // 计算面积和体积
        double area = radius * radius * Math.PI;
        double volume = area * length;
        // 显示结果，保留适当的小数位数
        System.out.printf("The area is %.4f\n", area);
        System.out.printf("The volume is %.1f\n", volume);
        input.close();
    }
}